import { DEBUG } from './config';


const Debug = {};

for (let key in console) {
    if (typeof console[key] !== 'function') {
        continue;
    }
    Debug[key] = (...args) => {
        if (DEBUG) {
            console[key](...args);
        } else {
            console.log(`[${key.toUpperCase()}]`, ...args);
        }
    }
}

export default Debug;